<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Net::POP3 - Post Office Protocol 3 Client class (RFC1939) - Perldoc Browser</title>
    <link rel="search" href="https://perldoc.perl.org/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser">
    <link rel="canonical" href="https://perldoc.perl.org/Net::POP3">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" />
    <style>
      body {
        background: #f4f4f5;
        color: #020202;
      }
      .navbar-dark {
        background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0);
        background-repeat: repeat-x;
      }
      .navbar-dark .navbar-nav .nav-link,
      .navbar-dark .navbar-nav .nav-link:focus { color: #fff }
      .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 }
      #wrapperlicious {
        margin: 0 auto;
        font: 0.9em 'Helvetica Neue', Helvetica, sans-serif;
        font-weight: normal;
        line-height: 1.5em;
        margin: 0;
        padding: 0;
      }
      #wrapperlicious h1 { font-size: 1.5em }
      #wrapperlicious h2 { font-size: 1.3em }
      #wrapperlicious h3 { font-size: 1.1em }
      #wrapperlicious h4 { font-size: 0.9em }
      #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3,
      #wrapperlicious h4, #wrapperlicious dt {
        color: #020202;
        margin-top: 1em;
        margin-bottom: 1em;
        position: relative;
        font-weight: bold;
      }
      #wrapperlicious a { color: inherit; text-decoration: underline }
      #wrapperlicious #toc { text-decoration: none }
      #wrapperlicious a:hover { color: #2a2a2a }
      #wrapperlicious a img { border: 0 }
      #wrapperlicious :not(pre) > code {
        color: inherit;
        background-color: rgba(0, 0, 0, 0.04);
        border-radius: 3px;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        padding: 0.3em;
      }
      #wrapperlicious dd {
        margin: 0;
        margin-left: 2em;
      }
      #wrapperlicious dt {
        color: #2a2a2a;
        font-weight: bold;
        margin-left: 0.9em;
      }
      #wrapperlicious p {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious li > p {
        margin-bottom: 0;
        margin-top: 0;
      }
      #wrapperlicious pre {
        border: 1px solid #c1c1c1;
        border-radius: 3px;
        font: 100% Consolas, Menlo, Monaco, monospace;
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious pre > code {
        display: block;
        background-color: #f6f6f6;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        line-height: 1.5em;
        text-align: left;
        white-space: pre;
        padding: 1em;
      }
      #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious ul {
        list-style-type: square;
      }
      #wrapperlicious ul ul {
        margin-bottom: 0px;
        margin-top: 0px;
      }
      #footer {
        font-size: 0.8em;
        padding-top: 0.5em;
        text-align: center;
      }
      #more {
        display: inline;
        font-size: 0.8em;
      }
      #perldocdiv {
        background-color: #fff;
        border: 1px solid #c1c1c1;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        margin-left: auto;
        margin-right: auto;
        padding: 3em;
        padding-top: 1em;
        max-width: 960px;
      }
      #moduleversion { float: right }
      #wrapperlicious .leading-notice {
        font-style: italic;
        padding-left: 1em;
        margin-top: 1em;
        margin-bottom: 1em;
      }
      #wrapperlicious .permalink {
        display: none;
        left: -0.75em;
        position: absolute;
        padding-right: 0.25em;
        text-decoration: none;
      }
      #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink,
      #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink,
      #wrapperlicious dt:hover .permalink {
        display: block;
      }
    </style>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'G-KVNWBNT5FB');
      gtag('config', 'UA-50555-3');
    </script>
  </head>
  <body>
    <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between">
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <a class="navbar-brand" href="https://perldoc.perl.org/">Perldoc Browser</a>
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./Net::POP3.html#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.35.0</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-stable">
          <a class="dropdown-item" href="https://perldoc.perl.org/Net::POP3">Latest</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.2/Net::POP3">5.38.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.1/Net::POP3">5.38.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0/Net::POP3">5.38.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.3/Net::POP3">5.36.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.2/Net::POP3">5.36.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.1/Net::POP3">5.36.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.0/Net::POP3">5.36.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.3/Net::POP3">5.34.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.2/Net::POP3">5.34.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.1/Net::POP3">5.34.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.0/Net::POP3">5.34.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.1/Net::POP3">5.32.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.0/Net::POP3">5.32.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.3/Net::POP3">5.30.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.2/Net::POP3">5.30.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.1/Net::POP3">5.30.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.0/Net::POP3">5.30.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.3/Net::POP3">5.28.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.2/Net::POP3">5.28.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.1/Net::POP3">5.28.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.0/Net::POP3">5.28.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.3/Net::POP3">5.26.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.2/Net::POP3">5.26.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.1/Net::POP3">5.26.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.0/Net::POP3">5.26.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.4/Net::POP3">5.24.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.3/Net::POP3">5.24.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.2/Net::POP3">5.24.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.1/Net::POP3">5.24.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.0/Net::POP3">5.24.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.4/Net::POP3">5.22.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.3/Net::POP3">5.22.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.2/Net::POP3">5.22.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.1/Net::POP3">5.22.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.0/Net::POP3">5.22.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.3/Net::POP3">5.20.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.2/Net::POP3">5.20.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.1/Net::POP3">5.20.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.0/Net::POP3">5.20.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.4/Net::POP3">5.18.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.3/Net::POP3">5.18.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.2/Net::POP3">5.18.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.1/Net::POP3">5.18.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.0/Net::POP3">5.18.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.3/Net::POP3">5.16.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.2/Net::POP3">5.16.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.1/Net::POP3">5.16.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.0/Net::POP3">5.16.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.4/Net::POP3">5.14.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.3/Net::POP3">5.14.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.2/Net::POP3">5.14.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.1/Net::POP3">5.14.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.0/Net::POP3">5.14.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.5/Net::POP3">5.12.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.4/Net::POP3">5.12.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.3/Net::POP3">5.12.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.2/Net::POP3">5.12.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.1/Net::POP3">5.12.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.0/Net::POP3">5.12.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.1/Net::POP3">5.10.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.0/Net::POP3">5.10.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.9/Net::POP3">5.8.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.8/Net::POP3">5.8.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.7/Net::POP3">5.8.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.6/Net::POP3">5.8.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.5/Net::POP3">5.8.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.4/Net::POP3">5.8.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.3/Net::POP3">5.8.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.2/Net::POP3">5.8.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.1/Net::POP3">5.8.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.0/Net::POP3">5.8.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.2/Net::POP3">5.6.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.1/Net::POP3">5.6.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.0/Net::POP3">5.6.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_04/Net::POP3">5.005_04</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_03/Net::POP3">5.005_03</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_02/Net::POP3">5.005_02</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_01/Net::POP3">5.005_01</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005/Net::POP3">5.005</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./Net::POP3.html#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-dev">
          <a class="dropdown-item" href="https://perldoc.perl.org/blead/Net::POP3">blead</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.6/Net::POP3">5.39.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.5/Net::POP3">5.39.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.4/Net::POP3">5.39.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.3/Net::POP3">5.39.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.2/Net::POP3">5.39.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.1/Net::POP3">5.39.1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC2/Net::POP3">5.38.0-RC2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC1/Net::POP3">5.38.0-RC1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.11/Net::POP3">5.37.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.10/Net::POP3">5.37.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.9/Net::POP3">5.37.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.8/Net::POP3">5.37.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.7/Net::POP3">5.37.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.6/Net::POP3">5.37.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.5/Net::POP3">5.37.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.4/Net::POP3">5.37.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.3/Net::POP3">5.37.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.2/Net::POP3">5.37.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.1/Net::POP3">5.37.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.0/Net::POP3">5.37.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.11/Net::POP3">5.35.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.10/Net::POP3">5.35.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.9/Net::POP3">5.35.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.8/Net::POP3">5.35.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.7/Net::POP3">5.35.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.6/Net::POP3">5.35.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.5/Net::POP3">5.35.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.4/Net::POP3">5.35.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.3/Net::POP3">5.35.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.2/Net::POP3">5.35.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.1/Net::POP3">5.35.1</a>
          <a class="dropdown-item active" href="./Net::POP3.html">5.35.0</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./Net::POP3.html#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-nav">
          <a class="dropdown-item" href="perl.html">Perl</a>
          <a class="dropdown-item" href="perlintro.html">Intro</a>
          <a class="dropdown-item" href="perl.html#Tutorials">Tutorials</a>
          <a class="dropdown-item" href="perlfaq.html">FAQs</a>
          <a class="dropdown-item" href="perl.html#Reference-Manual">Reference</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlop.html">Operators</a>
          <a class="dropdown-item" href="functions.html">Functions</a>
          <a class="dropdown-item" href="variables.html">Variables</a>
          <a class="dropdown-item" href="modules.html">Modules</a>
          <a class="dropdown-item" href="perlutil.html">Utilities</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlcommunity.html">Community</a>
          <a class="dropdown-item" href="perlhist.html">History</a>
        </div>
      </li>
    </ul>
    <ul class="navbar-nav">
      <script>
        function set_expand (expand) {
          var perldocdiv = document.getElementById('perldocdiv');
          var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width');
          var expanded = (width == '' || width == 'none') ? true : false;
          if (expand === null) {
            expand = !expanded;
          }
          if ((expand && !expanded) || (!expand && expanded)) {
            perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px');
            var button_classlist = document.getElementById('content-expand-button').classList;
            if (expand) {
              button_classlist.add('btn-light');
              button_classlist.remove('btn-outline-light');
            } else {
              button_classlist.add('btn-outline-light');
              button_classlist.remove('btn-light');
            }
          }
          return expand;
        }
        function toggle_expand () {
          var expand = set_expand(null);
          document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC';
        }
        function read_expand () {
          return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 });
        }
        if (document.readyState === 'loading') {
          document.addEventListener('DOMContentLoaded', function () {
            if (read_expand()) {
              set_expand(true);
            }
          });
        } else if (read_expand()) {
          set_expand(true);
        }
      </script>
      <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-2" onclick="toggle_expand()">Expand</button>
    <ul>
    <form class="form-inline" method="get" action="https://perldoc.perl.org/5.35.0/search">
      <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search">
    </form>
  </div>
</nav>

    <div id="wrapperlicious" class="container-fluid">
      <div id="perldocdiv">
        <div id="links">
          <a href="./Net::POP3.html">Net::POP3</a>
          <div id="more">
            (<a href="./Net::POP3.txt">source</a>,
            <a href="https://metacpan.org/pod/Net::POP3">CPAN</a>)
          </div>
            <div id="moduleversion">version 3.13</div>
        </div>
        <div class="leading-notice">
          You are viewing the version of this documentation from Perl 5.35.0.
            This is a development version of Perl.
        </div>
        <h1><a id="toc">CONTENTS</a></h1>
                  <ul>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#NAME">NAME</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#SYNOPSIS">SYNOPSIS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#DESCRIPTION">DESCRIPTION</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#Class-Methods">Class Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#Object-Methods">Object Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#Notes">Notes</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#EXPORTS">EXPORTS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#KNOWN-BUGS">KNOWN BUGS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#SEE-ALSO">SEE ALSO</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#AUTHOR">AUTHOR</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#COPYRIGHT">COPYRIGHT</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#LICENCE">LICENCE</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#VERSION">VERSION</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#DATE">DATE</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Net::POP3.html#HISTORY">HISTORY</a>
              </li>
          </ul>

      <h1 id="NAME"><a class="permalink" href="./Net::POP3.html#NAME">#</a>NAME</h1>

<p>Net::POP3 - Post Office Protocol 3 Client class (RFC1939)</p>

<h1 id="SYNOPSIS"><a class="permalink" href="./Net::POP3.html#SYNOPSIS">#</a>SYNOPSIS</h1>

<pre><code>use Net::POP3;

# Constructors
$pop = Net::POP3-&gt;new(&#39;pop3host&#39;);
$pop = Net::POP3-&gt;new(&#39;pop3host&#39;, Timeout =&gt; 60);
$pop = Net::POP3-&gt;new(&#39;pop3host&#39;, SSL =&gt; 1, Timeout =&gt; 60);

if ($pop-&gt;login($username, $password) &gt; 0) {
  my $msgnums = $pop-&gt;list; # hashref of msgnum =&gt; size
  foreach my $msgnum (keys %$msgnums) {
    my $msg = $pop-&gt;get($msgnum);
    print @$msg;
    $pop-&gt;delete($msgnum);
  }
}

$pop-&gt;quit;</code></pre>

<h1 id="DESCRIPTION"><a class="permalink" href="./Net::POP3.html#DESCRIPTION">#</a>DESCRIPTION</h1>

<p>This module implements a client interface to the POP3 protocol, enabling a perl5 application to talk to POP3 servers. This documentation assumes that you are familiar with the POP3 protocol described in RFC1939. With <a href="./IO::Socket::SSL.html">IO::Socket::SSL</a> installed it also provides support for implicit and explicit TLS encryption, i.e. POP3S or POP3+STARTTLS.</p>

<p>A new Net::POP3 object must be created with the <i>new</i> method. Once this has been done, all POP3 commands are accessed via method calls on the object.</p>

<p>The Net::POP3 class is a subclass of Net::Cmd and (depending on avaibility) of IO::Socket::IP, IO::Socket::INET6 or IO::Socket::INET.</p>

<h2 id="Class-Methods"><a class="permalink" href="./Net::POP3.html#Class-Methods">#</a><a id="Class"></a>Class Methods</h2>

<dl>

<dt id="new([$host][,-%options])"><a class="permalink" href="./Net::POP3.html#new(%5B$host%5D%5B,-%25options%5D)">#</a><a id="new"></a><a id="new-host-options"></a><code>new([$host][, %options])</code></dt>
<dd>

<p>This is the constructor for a new Net::POP3 object. <code>$host</code> is the name of the remote host to which an POP3 connection is required.</p>

<p><code>$host</code> is optional. If <code>$host</code> is not given then it may instead be passed as the <code>Host</code> option described below. If neither is given then the <code>POP3_Hosts</code> specified in <code>Net::Config</code> will be used.</p>

<p><code>%options</code> are passed in a hash like fashion, using key and value pairs. Possible options are:</p>

<p><b>Host</b> - POP3 host to connect to. It may be a single scalar, as defined for the <code>PeerAddr</code> option in <a href="./IO::Socket::INET.html">IO::Socket::INET</a>, or a reference to an array with hosts to try in turn. The <a href="./Net::POP3.html#host">&quot;host&quot;</a> method will return the value which was used to connect to the host.</p>

<p><b>Port</b> - port to connect to. Default - 110 for plain POP3 and 995 for POP3s (direct SSL).</p>

<p><b>SSL</b> - If the connection should be done from start with SSL, contrary to later upgrade with <code>starttls</code>. You can use SSL arguments as documented in <a href="./IO::Socket::SSL.html">IO::Socket::SSL</a>, but it will usually use the right arguments already.</p>

<p><b>LocalAddr</b> and <b>LocalPort</b> - These parameters are passed directly to IO::Socket to allow binding the socket to a specific local address and port. For compatibility with older versions <b>ResvPort</b> can be used instead of <b>LocalPort</b>.</p>

<p><b>Domain</b> - This parameter is passed directly to IO::Socket and makes it possible to enforce IPv4 connections even if <a href="./IO::Socket::IP.html">IO::Socket::IP</a> is used as super class. Alternatively <b>Family</b> can be used.</p>

<p><b>Timeout</b> - Maximum time, in seconds, to wait for a response from the POP3 server (default: 120)</p>

<p><b>Debug</b> - Enable debugging information</p>

</dd>
</dl>

<h2 id="Object-Methods"><a class="permalink" href="./Net::POP3.html#Object-Methods">#</a><a id="Object"></a>Object Methods</h2>

<p>Unless otherwise stated all methods return either a <i>true</i> or <i>false</i> value, with <i>true</i> meaning that the operation was a success. When a method states that it returns a value, failure will be returned as <i>undef</i> or an empty list.</p>

<p><code>Net::POP3</code> inherits from <code>Net::Cmd</code> so methods defined in <code>Net::Cmd</code> may be used to send commands to the remote POP3 server in addition to the methods documented here.</p>

<dl>

<dt id="host()"><a class="permalink" href="./Net::POP3.html#host()">#</a><a id="host"></a><code>host()</code></dt>
<dd>

<p>Returns the value used by the constructor, and passed to IO::Socket::INET, to connect to the host.</p>

</dd>
<dt id="auth($username,-$password)"><a class="permalink" href="./Net::POP3.html#auth($username,-$password)">#</a><a id="auth"></a><a id="auth-username-password"></a><code>auth($username, $password)</code></dt>
<dd>

<p>Attempt SASL authentication.</p>

</dd>
<dt id="user($user)"><a class="permalink" href="./Net::POP3.html#user($user)">#</a><a id="user"></a><a id="user-user"></a><code>user($user)</code></dt>
<dd>

<p>Send the USER command.</p>

</dd>
<dt id="pass($pass)"><a class="permalink" href="./Net::POP3.html#pass($pass)">#</a><a id="pass"></a><a id="pass-pass"></a><code>pass($pass)</code></dt>
<dd>

<p>Send the PASS command. Returns the number of messages in the mailbox.</p>

</dd>
<dt id="login([$user[,-$pass]])"><a class="permalink" href="./Net::POP3.html#login(%5B$user%5B,-$pass%5D%5D)">#</a><a id="login"></a><a id="login-user-pass"></a><code>login([$user[, $pass]])</code></dt>
<dd>

<p>Send both the USER and PASS commands. If <code>$pass</code> is not given the <code>Net::POP3</code> uses <code>Net::Netrc</code> to lookup the password using the host and username. If the username is not specified then the current user name will be used.</p>

<p>Returns the number of messages in the mailbox. However if there are no messages on the server the string <code>&quot;0E0&quot;</code> will be returned. This is will give a true value in a boolean context, but zero in a numeric context.</p>

<p>If there was an error authenticating the user then <i>undef</i> will be returned.</p>

</dd>
<dt id="starttls(%sslargs)"><a class="permalink" href="./Net::POP3.html#starttls(%25sslargs)">#</a><a id="starttls"></a><a id="starttls-sslargs"></a><code>starttls(%sslargs)</code></dt>
<dd>

<p>Upgrade existing plain connection to SSL. You can use SSL arguments as documented in <a href="./IO::Socket::SSL.html">IO::Socket::SSL</a>, but it will usually use the right arguments already.</p>

</dd>
<dt id="apop([$user[,-$pass]])"><a class="permalink" href="./Net::POP3.html#apop(%5B$user%5B,-$pass%5D%5D)">#</a><a id="apop"></a><a id="apop-user-pass"></a><code>apop([$user[, $pass]])</code></dt>
<dd>

<p>Authenticate with the server identifying as <code>$user</code> with password <code>$pass</code>. Similar to <a href="./Net::POP3.html#login">&quot;login&quot;</a>, but the password is not sent in clear text.</p>

<p>To use this method you must have the Digest::MD5 or the MD5 module installed, otherwise this method will return <i>undef</i>.</p>

</dd>
<dt id="banner()"><a class="permalink" href="./Net::POP3.html#banner()">#</a><a id="banner"></a><code>banner()</code></dt>
<dd>

<p>Return the sever&#39;s connection banner</p>

</dd>
<dt id="capa()"><a class="permalink" href="./Net::POP3.html#capa()">#</a><a id="capa"></a><code>capa()</code></dt>
<dd>

<p>Return a reference to a hash of the capabilities of the server. APOP is added as a pseudo capability. Note that I&#39;ve been unable to find a list of the standard capability values, and some appear to be multi-word and some are not. We make an attempt at intelligently parsing them, but it may not be correct.</p>

</dd>
<dt id="capabilities()"><a class="permalink" href="./Net::POP3.html#capabilities()">#</a><a id="capabilities"></a><code>capabilities()</code></dt>
<dd>

<p>Just like capa, but only uses a cache from the last time we asked the server, so as to avoid asking more than once.</p>

</dd>
<dt id="top($msgnum[,-$numlines])"><a class="permalink" href="./Net::POP3.html#top($msgnum%5B,-$numlines%5D)">#</a><a id="top"></a><a id="top-msgnum-numlines"></a><code>top($msgnum[, $numlines])</code></dt>
<dd>

<p>Get the header and the first <code>$numlines</code> of the body for the message <code>$msgnum</code>. Returns a reference to an array which contains the lines of text read from the server.</p>

</dd>
<dt id="list([$msgnum])"><a class="permalink" href="./Net::POP3.html#list(%5B$msgnum%5D)">#</a><a id="list"></a><a id="list-msgnum"></a><code>list([$msgnum])</code></dt>
<dd>

<p>If called with an argument the <code>list</code> returns the size of the message in octets.</p>

<p>If called without arguments a reference to a hash is returned. The keys will be the <code>$msgnum</code>&#39;s of all undeleted messages and the values will be their size in octets.</p>

</dd>
<dt id="get($msgnum[,-$fh])"><a class="permalink" href="./Net::POP3.html#get($msgnum%5B,-$fh%5D)">#</a><a id="get"></a><a id="get-msgnum-fh"></a><code>get($msgnum[, $fh])</code></dt>
<dd>

<p>Get the message <code>$msgnum</code> from the remote mailbox. If <code>$fh</code> is not given then get returns a reference to an array which contains the lines of text read from the server. If <code>$fh</code> is given then the lines returned from the server are printed to the filehandle <code>$fh</code>.</p>

</dd>
<dt id="getfh($msgnum)"><a class="permalink" href="./Net::POP3.html#getfh($msgnum)">#</a><a id="getfh"></a><a id="getfh-msgnum"></a><code>getfh($msgnum)</code></dt>
<dd>

<p>As per get(), but returns a tied filehandle. Reading from this filehandle returns the requested message. The filehandle will return EOF at the end of the message and should not be reused.</p>

</dd>
<dt id="last()"><a class="permalink" href="./Net::POP3.html#last()">#</a><a id="last"></a><code>last()</code></dt>
<dd>

<p>Returns the highest <code>$msgnum</code> of all the messages accessed.</p>

</dd>
<dt id="popstat()"><a class="permalink" href="./Net::POP3.html#popstat()">#</a><a id="popstat"></a><code>popstat()</code></dt>
<dd>

<p>Returns a list of two elements. These are the number of undeleted elements and the size of the mbox in octets.</p>

</dd>
<dt id="ping($user)"><a class="permalink" href="./Net::POP3.html#ping($user)">#</a><a id="ping"></a><a id="ping-user"></a><code>ping($user)</code></dt>
<dd>

<p>Returns a list of two elements. These are the number of new messages and the total number of messages for <code>$user</code>.</p>

</dd>
<dt id="uidl([$msgnum])"><a class="permalink" href="./Net::POP3.html#uidl(%5B$msgnum%5D)">#</a><a id="uidl"></a><a id="uidl-msgnum"></a><code>uidl([$msgnum])</code></dt>
<dd>

<p>Returns a unique identifier for <code>$msgnum</code> if given. If <code>$msgnum</code> is not given <code>uidl</code> returns a reference to a hash where the keys are the message numbers and the values are the unique identifiers.</p>

</dd>
<dt id="delete($msgnum)"><a class="permalink" href="./Net::POP3.html#delete($msgnum)">#</a><a id="delete"></a><a id="delete-msgnum"></a><code>delete($msgnum)</code></dt>
<dd>

<p>Mark message <code>$msgnum</code> to be deleted from the remote mailbox. All messages that are marked to be deleted will be removed from the remote mailbox when the server connection closed.</p>

</dd>
<dt id="reset()"><a class="permalink" href="./Net::POP3.html#reset()">#</a><a id="reset"></a><code>reset()</code></dt>
<dd>

<p>Reset the status of the remote POP3 server. This includes resetting the status of all messages to not be deleted.</p>

</dd>
<dt id="quit()"><a class="permalink" href="./Net::POP3.html#quit()">#</a><a id="quit"></a><code>quit()</code></dt>
<dd>

<p>Quit and close the connection to the remote POP3 server. Any messages marked as deleted will be deleted from the remote mailbox.</p>

</dd>
<dt id="can_inet6()"><a class="permalink" href="./Net::POP3.html#can_inet6()">#</a><a id="can_inet6"></a><code>can_inet6()</code></dt>
<dd>

<p>Returns whether we can use IPv6.</p>

</dd>
<dt id="can_ssl()"><a class="permalink" href="./Net::POP3.html#can_ssl()">#</a><a id="can_ssl"></a><code>can_ssl()</code></dt>
<dd>

<p>Returns whether we can use SSL.</p>

</dd>
</dl>

<h2 id="Notes"><a class="permalink" href="./Net::POP3.html#Notes">#</a>Notes</h2>

<p>If a <code>Net::POP3</code> object goes out of scope before <code>quit</code> method is called then the <code>reset</code> method will called before the connection is closed. This means that any messages marked to be deleted will not be.</p>

<h1 id="EXPORTS"><a class="permalink" href="./Net::POP3.html#EXPORTS">#</a>EXPORTS</h1>

<p><i>None</i>.</p>

<h1 id="KNOWN-BUGS"><a class="permalink" href="./Net::POP3.html#KNOWN-BUGS">#</a><a id="KNOWN"></a>KNOWN BUGS</h1>

<p>See <a href="https://rt.cpan.org/Dist/Display.html?Status=Active&amp;Queue=libnet">https://rt.cpan.org/Dist/Display.html?Status=Active&amp;Queue=libnet</a>.</p>

<h1 id="SEE-ALSO"><a class="permalink" href="./Net::POP3.html#SEE-ALSO">#</a><a id="SEE"></a>SEE ALSO</h1>

<p><a href="./Net::Netrc.html">Net::Netrc</a>, <a href="./Net::Cmd.html">Net::Cmd</a>, <a href="./IO::Socket::SSL.html">IO::Socket::SSL</a>.</p>

<h1 id="AUTHOR"><a class="permalink" href="./Net::POP3.html#AUTHOR">#</a>AUTHOR</h1>

<p>Graham Barr &lt;<a href="mailto:gbarr@pobox.com">gbarr@pobox.com</a>&gt;.</p>

<p>Steve Hay &lt;<a href="mailto:shay@cpan.org">shay@cpan.org</a>&gt; is now maintaining libnet as of version 1.22_02.</p>

<h1 id="COPYRIGHT"><a class="permalink" href="./Net::POP3.html#COPYRIGHT">#</a>COPYRIGHT</h1>

<p>Copyright (C) 1995-2004 Graham Barr. All rights reserved.</p>

<p>Copyright (C) 2013-2016, 2020 Steve Hay. All rights reserved.</p>

<h1 id="LICENCE"><a class="permalink" href="./Net::POP3.html#LICENCE">#</a>LICENCE</h1>

<p>This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself, i.e. under the terms of either the GNU General Public License or the Artistic License, as specified in the <i>LICENCE</i> file.</p>

<h1 id="VERSION"><a class="permalink" href="./Net::POP3.html#VERSION">#</a>VERSION</h1>

<p>Version 3.13</p>

<h1 id="DATE"><a class="permalink" href="./Net::POP3.html#DATE">#</a>DATE</h1>

<p>23 Dec 2020</p>

<h1 id="HISTORY"><a class="permalink" href="./Net::POP3.html#HISTORY">#</a>HISTORY</h1>

<p>See the <i>Changes</i> file.</p>


      </div>
      <div id="footer">
        <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p>

<p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p>


      </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
    <script src="../highlight.pack.js"></script>
    <script>hljs.highlightAll();</script>
  </body>
</html>
